/////////////////////////////////////////////////////////////////////
// CacheService.cpp
//
//
// 11/16/2010
//
/////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "CacheService.h"
#include "CacheMsgHandler.h"



CacheService::CacheService( CacheMsgHandler* pCacheMsgHandler )
: m_pCacheMsgHandler( pCacheMsgHandler )
{
}

CacheService::~CacheService( void )
{
	if ( m_pCacheMsgHandler )
	{
		delete m_pCacheMsgHandler;
		m_pCacheMsgHandler = NULL;
	}	
}

void CacheService::RegisterMessage( int msgID, CacheMsgHandler* message )
{
	m_pCacheMsgHandler->RegisterMessage( msgID, message );
}

void CacheService::ReceiveMsg( DBMessage* message ) const
{
	m_pCacheMsgHandler->handleMsg( message );
}

